package com.hero.part.boot.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * @author yuez
 * @date 2018/3/5
 */
@ConfigurationProperties("pac4j")
public class Pac4jProperties {

	private Callback callback = new Callback();

	private Logout logout = new Logout();

	public Callback getCallback() {
		return callback;
	}

	public void setCallback(Callback callback) {
		this.callback = callback;
	}

	public Logout getLogout() {
		return logout;
	}

	public void setLogout(Logout logout) {
		this.logout = logout;
	}

	/**
	 * 回调
	 */
	static class Callback{
		private String defaultUrl;
		private Boolean multiProfile;
		private Boolean renewSession;

		public String getDefaultUrl() {
			return defaultUrl;
		}

		public void setDefaultUrl(String defaultUrl) {
			this.defaultUrl = defaultUrl;
		}

		public Boolean getMultiProfile() {
			return multiProfile;
		}

		public void setMultiProfile(Boolean multiProfile) {
			this.multiProfile = multiProfile;
		}

		public Boolean getRenewSession() {
			return renewSession;
		}

		public void setRenewSession(Boolean renewSession) {
			this.renewSession = renewSession;
		}
	}

	/**
	 * 登出
	 */
	static class Logout{
		private String defaultUrl;
		private String urlPattern;
		private Boolean localLogout;
		private Boolean destroySession;
		private Boolean centralLogout;

		public String getDefaultUrl() {
			return defaultUrl;
		}

		public void setDefaultUrl(String defaultUrl) {
			this.defaultUrl = defaultUrl;
		}

		public String getUrlPattern() {
			return urlPattern;
		}

		public void setUrlPattern(String urlPattern) {
			this.urlPattern = urlPattern;
		}

		public Boolean getLocalLogout() {
			return localLogout;
		}

		public void setLocalLogout(Boolean localLogout) {
			this.localLogout = localLogout;
		}

		public Boolean getDestroySession() {
			return destroySession;
		}

		public void setDestroySession(Boolean destroySession) {
			this.destroySession = destroySession;
		}

		public Boolean getCentralLogout() {
			return centralLogout;
		}

		public void setCentralLogout(Boolean centralLogout) {
			this.centralLogout = centralLogout;
		}
	}

}
